package com.softstone.sng.messages;

import com.jme3.math.Vector3f;
import com.jme3.network.AbstractMessage;
import com.jme3.network.serializing.Serializable;

/**
 *
 * @author Tomav
 */
@Serializable
public class PlayerMessage extends AbstractMessage
{

  private int id;
  private boolean active;
  private Vector3f position;

  public PlayerMessage()
  {
  }

  public PlayerMessage(int a_id, boolean a_isActive, Vector3f a_position)
  {
    id = a_id;
    active = a_isActive;
    if(active)
      position = a_position.clone();
    else
      position = Vector3f.UNIT_Z.clone();
  }

  public int getId()
  {
    return id;
  }

  public boolean isActive()
  {
    return active;
  }

  public Vector3f getPosition()
  {
    return position;
  }
}
